//
//  Logger.h
//  Prism
//
//  Created by Bas du Pre on 24-05-11.
//  Copyright 2011 UU. All rights reserved.
//

#pragma once

#include <cstdarg>

#include "global.h"

#include "PString.h"

namespace Prism {    
    
    class String;
    
    class Logger {
        
        Logger();
        virtual ~Logger();
        
        static Logger *s_instance;
        
    private:
        String _lastMessage;
        
    public:
        static Logger *instance();
        
        String lastMessage();
        
        void log(String format, ...);
        void logInternal(String format, const char * function, const char * file, int line, ...);
        void logError(String format, ...);
        void logErrorInternal(String format, const char * function, const char * file, int line, ...);
        void logInfo(String format, ...);
        void logInfoInternal(String format, const char * function, const char * file, int line, ...);
        
    private:
        
        
        
    };

}

